package day01;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * @author tongchen
 * @create 2022-11-20 20:54
 */
public class Day01_2 {
    public static void main(String[] args) {

        //创建测试用例
        Scanner scan =new Scanner(System.in);
        String s1=scan.nextLine();
        String s2=scan.nextLine();
        //创建map
        Set<Character>set=new HashSet<Character>() ;
        //放入要删除的字符
        for (int i = 0; i < s2.length(); i++) {
            set.add(s2.charAt(i));
        }
        //创建SB
        StringBuilder sb = new StringBuilder();
        //遍历字符串1
        for(int i=0;i<s1.length();++i){
            if(!set.contains(s1.charAt(i))){
                sb.append(s1.charAt(i));
            }
        }
        System.out.println(sb);
    }

}
